package com.javasm.service.impl;

import com.javasm.dao.impl.EditMenuDaoImpl;
import com.javasm.entity.AdminMenu;
import com.javasm.service.EditMenuService;

/**
 * @author WangJie
 * @version 1.0
 * @Description:
 * @date: 2020/7/19 20:35
 * @since JDK 1.8
 */
public class EditMenuServiceImpl implements EditMenuService {
    /**
     * 新增菜单信息
     *
     * @param adminMenu 要新增的菜单对象
     * @return
     */
    @Override
    public int insertMenuInfo(AdminMenu adminMenu) {
        return new EditMenuDaoImpl().insertMenuInfo(adminMenu);
    }

    /**
     * 通过id修改菜单信息
     *
     * @param adminMenu 要修改的菜单对象
     * @return
     */
    @Override
    public int updateMenuInfo(AdminMenu adminMenu) {
        return new EditMenuDaoImpl().updateMenuInfo(adminMenu);
    }

    /**
     * 通过id删除菜单
     *
     * @param pid 要删除的用户id
     * @return
     */
    @Override
    public int deleteMenuInfo(String pid) {
        return new EditMenuDaoImpl().deleteMenuInfo(pid);
    }
}
